package com.ruoyi.crm.service;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.crm.domain.CrmContract;
import com.ruoyi.crm.domain.CrmOrder;
import com.ruoyi.crm.domain.CrmOrderCollectPayMoney;
import com.ruoyi.crm.domain.dto.CrmContractDTO;
import com.ruoyi.crm.domain.dto.CrmProjectDTO;
import com.ruoyi.crm.domain.dto.CrmStatisticsSearchDTO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author YanWenliang
 * @date 2024/12/20 10:09
 * @desciption: 数据统计
 */
public interface ICrmDataStatisticsService {

    /**
     * 统计商机数量、待办、待续费数据
     * @return
     */
    Map<String, Integer> statisticsProjectNumberAndTodoAndRenewed();

    /**
     * 统计业绩数据
     * @param crmStatisticsSearchDTO
     * @return
     */
    Map<String, BigDecimal> statisticsPerformance(CrmStatisticsSearchDTO crmStatisticsSearchDTO);

    /**
     * 统计实际支出数据
     * @param crmStatisticsSearchDTO
     * @return
     */
    Map<String, BigDecimal> statisticsActualSpending(CrmStatisticsSearchDTO crmStatisticsSearchDTO);

    /**
     * 统计待办数据数量
     * @param crmStatisticsSearchDTO
     * @return
     */
    Map<String, Object> statisticsToDo(CrmStatisticsSearchDTO crmStatisticsSearchDTO);

    /**
     * 获取销售额排行
     * @param crmStatisticsSearchDTO
     * @return
     */
    List<CrmContractDTO> statisticsSales(CrmStatisticsSearchDTO crmStatisticsSearchDTO);

    /**
     * 成交次数客户排行
     * @param crmStatisticsSearchDTO
     * @return
     */
    List<CrmContractDTO> statisticsTransactionsCount(CrmStatisticsSearchDTO crmStatisticsSearchDTO);

    /**
     * 统计商机数量、待续费列表数据
     * @param crmStatisticsSearchDTO
     * @return
     */
    List<CrmOrder> getOrderAndIsRenewalList(CrmStatisticsSearchDTO crmStatisticsSearchDTO);

    /**
     * 统计合同列表
     * @param crmStatisticsSearchDTO
     * @return
     */
    List<CrmProjectDTO> getContractMoneySumList(CrmStatisticsSearchDTO crmStatisticsSearchDTO);

    /**
     * 统计90，60，30 数据列表
     * @param crmStatisticsSearchDTO
     * @return
     */
    List<CrmOrder> getPerformanceList(CrmStatisticsSearchDTO crmStatisticsSearchDTO);

    /**
     * 付款数据
     * @param crmStatisticsSearchDTO
     * @return
     */
    List<CrmOrderCollectPayMoney> getPayAmtList(CrmStatisticsSearchDTO crmStatisticsSearchDTO);

    /**
     * 收款数据
     * @param crmStatisticsSearchDTO
     * @return
     */
    List<CrmOrderCollectPayMoney> getCollectionAmtList(CrmStatisticsSearchDTO crmStatisticsSearchDTO);
}
